$('#flash-content').empty();
$('.modalBox-flash').empty();
<%- if flash[:alert] %>
  request_processed = false;
  $('.modalBox-flash').append('<div class="alert"><%= escape_javascript(flash[:alert]) %></div>');
  $('.modalBox-flash').fadeIn('slow');
<%- else %>
  request_processed = true;
  var row = $('#apps-table').append('<%= escape_javascript(render :partial => "app_item", :collection => @new_app) %>').find('tr:last').addClass('highlight').hide();
  row.fadeIn(1800, function() { $(this).removeClass('highlight'); });
  appsTable.dataTable().fnDestroy();
  appsTable.dataTable(appsTable_Settings);
  <%- if flash[:notice] %>
    $('#flash-content').append('<div class="notice"><%= escape_javascript(flash[:notice]) %></div>');
    $('#flash').fadeIn('slow');
  <%- end %>
<%- end %>
